<?php
class CodeController extends BpfController
{
  private function __router($paths)
  {
    return [
      'callback' => 'buildCode',
      'arguments' => [ join('/', $paths) ],
    ];
  }

  public function buildCode($key = '')
  {
    $captchaModel = $this->getModel('captcha');
    $captchaModel->buildCode($key);
    $captchaModel->display($key, 180, 50);
  }
}
